/*
 * Created by SharpDevelop.
 * User: Edward Wilde (http://blogs.charteris.com/edwardw)
 * Date: 30/06/2007
 * Time: 12:15
 * 
 */

using System;
using WatiN.Core;

namespace Wax
{
	/// <summary>
	/// Enumeration of different types of commands that can be executed using a <see cref="Command" /> object.
	/// </summary>
	public enum CommandType
	{
		/// <summary>
		/// No command specified.
		/// </summary>
		None,
		
		/// <summary>
		/// Used to click an <see cref="WatiN.Core.Element">element</see>.
		/// </summary>
		Click,

        /// <summary>
        /// Used to click an <see cref="WatiN.Core.Element">element</see> but not to wait for the result of the click action to complete.
        /// Useful when interacting with dialogs, as it allows you to interact with modal dialogs.
        /// </summary>
        ClickNoWait,

		/// <summary>
		/// Used to double click an <see cref="WatiN.Core.Element">element</see>.
		/// </summary>
		DoubleClick,
		
		/// <summary>
		/// Navigate to a Url.
		/// </summary>
		GoTo,
		
		/// <summary>
		/// Used to set the value of an <see cref="WatiN.Core.Element">Element</see>
		/// </summary>
		SetValue,
		
		/// <summary>
		/// Used to set multiple values of an <see cref="WatiN.Core.Element">Element</see>
		/// </summary>
		SetValues,
		
		/// <summary>
		/// Navigates to the previous page in the browser's history.
		/// </summary>
		Back,

        /// <summary>
        /// Brings the test browser window to the front
        /// </summary>
        BringToFront,

		/// <summary>
		/// Navigates forward in the browser's history.
		/// </summary>
		Forward,
		
		/// <summary>
		/// Validates a given property of an <see cref="WatiN.Core.Element">element</see> has an expected value
		/// </summary>
		Validate,

        /// <summary>
        /// Validates a given property of an <see cref="WatiN.Core.Element">element</see> has multiple expected value
        /// </summary>
        ValidateItems,

        /// <summary>
        /// Attaches to a running instance of Internet Explorer
        /// </summary>
        AttachToIE,

        /// <summary>
        /// Closes the current attached instance of Internet Explorer
        /// </summary>
	    Close,
	    
        /// <summary>
        /// Causes the selected element to flash
        /// </summary>
        Flash,

        /// <summary>
        /// Causes the current page to refresh
        /// </summary>
	    Refresh,

        /// <summary>
        /// Presses the tab key moving focus to the next element in the tab order.
        /// </summary>
	    PressTab,

        /// <summary>
        /// Sets focus to a given <see cref="WatiN.Core.Element">element</see>.
        /// </summary>
        Focus,

        /// <summary>
        /// Types text, note this can only be used on a text input element.
        /// </summary>
	    TypeText,

        /// <summary>
        /// Appends text, note this can only be used on a text input element.
        /// </summary>
	    AppendText,

        /// <summary>
        /// Clears the text, note this can only be used on a text input element.
        /// </summary>
        ClearText,

        /// <summary>
        /// Selected the text value, not this can only be used on a text input element.
        /// </summary>
        SelectText,

        /// <summary>
        /// Clears out the Internet Explorer cache, best to use as the first command in a test.
        /// </summary>
        ClearCache,

        /// <summary>
        /// Clears all browser cookies, or if specified all cookies for a given url.
        /// </summary>
        ClearCookies,

        /// <summary>
        /// Generates a screen shot of the current browser.
        /// </summary>
        Screenshot,

        /// <summary>
        /// SetCookie command allows you to set the value of a cookie for a specified domain.
        /// </summary>
        SetCookie,

        /// <summary>
        /// GetCookie command allows you to retrieve the value of cookie, to be used later in a validation command
        /// </summary>
        GetCookie,

        /// <summary>
        /// Validate the last found value, from a previous "Get" command i.e. GetCookie
        /// </summary>
        ValidateLastFound,
	    
        /// <summary>
        /// Used to attach a dialog handler to the current test
        /// </summary>
        AttachDialogHandler,

        /// <summary>
        /// Used to retrive the message from a javascript dialog
        /// </summary>
        GetJavaDialogMessage,
	    
        /// <summary>
        /// Used to change the default values of the browser settings <see cref="IE.Settings"/>.
        /// </summary>
        Settings
	}
}
